package com.it.sun.easychat.framework.mybatisplus;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author sunmannian
 * @ClassName MybatisPlusConfiguration
 * @Date 2020/5/24 12:46
 * @Version V1.0
 * Description  <请输入一句话描述该类功能>
 * Copyright (C) 北京中电兴发科技有限公司  since 2020/5/24
 */
@Configuration
@Slf4j
public class MybatisPlusConfiguration {

    private static final int UN_LIMIT= -1;

    @Bean
    public PaginationInterceptor paginationInterceptor() {
        log.info("init  PaginationInterceptor ");
        PaginationInterceptor interceptor = new PaginationInterceptor();
        interceptor.setLimit(UN_LIMIT);
        return interceptor;
    }


}
